package o;

import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;
import com.huawei.appmarket.service.distribution.activereport.AppActiveReportResponse;
import java.util.Map.Entry;

public class dxe {

    public static class c implements IServerCallBack {
        private c() {
        }

        public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
        }

        public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
            if (responseBean != null) {
                AppActiveReportResponse appActiveReportResponse = (AppActiveReportResponse) responseBean;
                if (appActiveReportResponse.getResponseCode() == 0 && appActiveReportResponse.getRtnCode_() == 0) {
                    Logger.ˎ("AppActiveReportTask", "app active report success");
                    return;
                }
                Logger.e("AppActiveReportTask", "app active report fail:" + appActiveReportResponse.ˏ());
                dxf o_dxf = (dxf) o_cvu;
                dwx.ˋ().ˎ(o_dxf.ˋ(), o_dxf.ˎ());
            }
        }
    }

    public void ˊ(String str, String str2) {
        Object obj = null;
        Object obj2 = 1;
        if (!doo.ˊ(ContentManager.getInstant().getContext())) {
            Logger.ˋ("AppActiveReportTask", "network is unreachable");
            obj2 = null;
        }
        if (ccx.ॱ()) {
            obj = obj2;
        } else {
            Logger.ˋ("AppActiveReportTask", "not agree protocol");
        }
        if (obj != null) {
            cfw.ˎ(new dxf(str, str2), new c());
        } else {
            dwx.ˋ().ˎ(str, str2);
        }
    }

    public void ˊ() {
        for (Entry entry : dwx.ˋ().ॱ().entrySet()) {
            dwx.ˋ().ॱ((String) entry.getKey());
            ˊ((String) entry.getKey(), String.valueOf(entry.getValue()));
        }
    }
}
